
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

<?php
	
	//View Controller_Nganh 

	include('stdlib.php');
	include('Connect_DB.php'); //file include and Run connect Database.Dont move this file following
	include('Model.php');
	 
	$result = Count_Nganh(); //Call function form file Model.php
	
	echo form_open("Dem nganh dao tao theo khoa");
	echo '<h2><center> ĐẾM SỐ NGÀNH ĐÀO TẠO CỦA TỪNG KHOA </center></h2><br /><hr>';
	
	echo '<br />';
	
	//View Form 
	echo tbl_open('100%', '2');
	echo tr(td('Tên Khoa Đào Tạo', '50%').td('Số Ngành ĐT Của Khoa', '50%'), 'center');

	while($row=mysql_fetch_array($result))
	{	
		echo tr(td($row['A']).td($row['B']),'center');
	}
	echo tbl_close();
	echo form_close();
	
	echo'<br />';
	
	//View button "Count"
	echo '<form action="Refresh_Count_Nganh.php?action=COUNT" method="POST">';
	echo '<center><input type="submit" name="submit" value="COUNT" /></center>';
	echo '</form>';
?>